#include <iostream>
#include <cstdio>
using namespace std;

int ans[] = {0, 0, 18412, 82737, 33903,
             54309,
             15234,
             66633,
             62426,
             68455,
             10000,
             39896,
             28051,
             22713,
             12269,
             44934,
             11494,
             59142,
             12604,
             95085,
             18412,
             55130,
             73461,
             23358,
             51650,
             29495,
             40828,
             56638,
             22591,
             75019,
             82737};
int main()
{
    int a;
    cin >> a;
    cout << ans[a];
}